package model

// RelationModel 关系模型表（定义图谱结构模板）
type RelationModel struct {
	BaseModel          // 继承公共字段：id, created_at, updated_at, deleted_at
	ModelCode   string `gorm:"column:MODEL_CODE;unique;not null;size:50;comment:关系模型唯一编码（如model_person_social）" json:"model_code"`
	ModelName   string `gorm:"column:MODEL_NAME;not null;size:100;comment:关系模型名称（如人员-社交账号模型）" json:"model_name"`
	Description string `gorm:"column:DESCRIPTION;size:500;comment:模型描述" json:"description,omitempty"`
	Status      string `gorm:"column:STATUS;not null;size:20;default:'draft';comment:模型状态（draft/active/disabled）" json:"status"`
	NebulaSpace string `gorm:"column:NEBULA_SPACE;size:50;comment:同步到Nebula的空间名" json:"nebula_space,omitempty"`
	CreatedUser int    `gorm:"column:CREATED_USER;type:INT;comment:创建人" json:"created_user,omitempty"`
	IsPublic    bool   `gorm:"column:IS_PUBLIC;type:INT;default:0;comment:是否为公共模型（0=否，1=是）" json:"is_public"`
}

func (RelationModel) TableName() string {
	return "RELATION_MODELS"
}
